package com.david.zhufengfm.entity.discoverrecommend;

/**
 * Created by David on 2015/10/21.
 * qq:978944820
 */

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * 发现新奇
 */
public class DiscoverRecommendColumns extends DiscoverRecommendItem{
    private int ret;
    private List<ColumnsRecommend> columnsRecommends;
    public void parseJSON(JSONObject json) throws JSONException {
        super.parseJson(json);
        ret=json.getInt("ret");
        JSONArray jsonArray=json.getJSONArray("list");
        columnsRecommends=new LinkedList<>();
        for (int i = 0; i < jsonArray.length(); i++) {
            JSONObject object=jsonArray.getJSONObject(i);
            ColumnsRecommend columnsRecommend=new ColumnsRecommend();
            columnsRecommend.parseJSON(object);
            columnsRecommends.add(columnsRecommend);
        }
    }

    public int getRet() {
        return ret;
    }

    public List<ColumnsRecommend> getColumnsRecommends() {
        return columnsRecommends;
    }
}
